<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
<h:head><title>Seleziona Volo</title></h:head>
<h:body>
#{PackBean.setGiornataFocus(param.ng)}
<h:form>  

    <table border='2'> 
    	<tr>
            <td><h:outputText value="#{PackBean.pack.getGiornata(param.ng-1).getTrasporto().getVolo().getLuogoPartenza()}" /></td>  
            <td><h:outputText value="#{PackBean.pack.getGiornata(param.ng-1).getTrasporto().getVolo().getLuogoArrivo()}" /></td>   
            <td><h:outputText value="#{PackBean.pack.getGiornata(param.ng-1).getTrasporto().getVolo().getOrarioPartenza()}" /></td>   
            <td><h:outputText value="#{PackBean.pack.getGiornata(param.ng-1).getTrasporto().getVolo().getOrarioArrivo()}" /></td> 
            <td><h:outputText value="#{PackBean.pack.getGiornata(param.ng-1).getTrasporto().getVolo().getCosto()}" /></td>  
	 	    <td><p:commandButton value="Rimuovi" action="#{PackBean.rimuoviProdottoV()}"/></td> 
	 	  </tr>
    </table>
  
    <br></br><br></br>
    
    <p:dataTable id="dataTable" var="listv" value="#{ProdottiBase.listaVolo()}" widgetVar="voloTable"   
            emptyMessage="Nessun Volo Trovato" filteredValue="#{ProdottiBase.selectedVolo}">  
        
        <p:column id="partenzaColumn" filterBy="luogoPartenza"   
                headerText="Partenza"
                filterMatchMode="contains">  
            <h:outputText value="#{listv.luogoPartenza}" />  
        </p:column>  

        <p:column id="arrivoColumn" filterBy="luogoArrivo"   
                headerText="Arrivo" 
                filterMatchMode="contains">  
            <h:outputText value="#{listv.luogoArrivo}" />  
        </p:column>  
        
         <p:column id="orarioPColumn" filterBy="orarioPartenza"   
                headerText="Orario Partenza"
                filterMatchMode="contains">  
            <h:outputText value="#{listv.orarioPartenza}" />  
        </p:column>

         <p:column id="orarioAColumn" filterBy="orarioArrivo"   
                headerText="Orario Arrivo"
                filterMatchMode="contains">  
            <h:outputText value="#{listv.orarioArrivo}" />  
        </p:column>  
        
        <p:column id="costoColumn" filterBy="costo"   
                headerText="Costo"
                filterMatchMode="contains">  
            <h:outputText value="#{listv.costo}" />  
        </p:column>  
              
        
	  <p:column>
	 	 <p:commandButton value="Seleziona" action="#{PackBean.modificaProdottoV(listv)}"/>
	  </p:column>
	</p:dataTable>
</h:form>

</h:body>
</html>